import { useEffect } from 'react';

export default function useSetHtmlBody(styles: any) {
  useEffect(() => {
    const htmlDom = document.getElementsByTagName('html')[0];
    htmlDom.classList.add(styles.html);
    document.body.classList.add(styles.body);
    return () => {
      htmlDom.classList.remove(styles.html);
      document.body.classList.remove(styles.body);
    };
  }, []);
}
